You are here: Statements and Functions > DTDelay()
Syntax samples
DTDELAY(<time unit>)
WAIT Att1 - DTDELAY(Min)
DISPLAY "The downtime delay was"$DTDelay(DAY)$"days."
Returns the difference between the time when you scheduled a non-preemptive downtime to occur and the time it actually occurred. Use DTDelay to determine if downtimes are being postponed because of incompleted work. You can use DTDelay in downtime logic to ensure that a location comes back up at a specific time.
Also returns the difference between the time when a downtime is preempted and the time it resumes.
Any downtime logic including off-shift and break logic. This function returns a real number.
Components
<time unit>
The function will return the downtime delay in any of the following units: SEC, MIN, HR, DAY, and WK.
Example
The following statement models a situation where a location is supposed to go down at 12:00 and always goes back up at 1:00, even if it stays up past 12:00 to finish processing an entity. If the downtime was missed entirely (meaning that the downtime delay was greater than an hour), then the downtime takes no time at all. If the downtime was not missed entirely, then it lasts one hour minus the delay.
IF 60 - DTDelay(min) > 0 THEN WAIT (60 - DTDelay(min))
DOWNQTY().